function Analyze_pi0()
    clear all;clc;cd('./');format compact;format short g;close all hidden;

% % % %  Paras = [ r mu sigma rho gamma x0 I p  eta1 eta2 lambda T];;
    ip=11;
    dana=0.1;
    pi0=0:dana:1;
    ana=pi0;
    

    n=length(ana);

    
    Paras = Parameters;
  
    
    xi0=zeros(n,1);
    xi1=zeros(n,1);
    xis=zeros(n,1);
    xip0=zeros(n,1);
    xip=zeros(n,1);
    phi0=zeros(n,1);
    phi1=zeros(n,1);
    phis=zeros(n,1);
    phip=zeros(n,1);
    Cs=zeros(n,1);
    Cp=zeros(n,1);
    pi=zeros(n,1);
    Fp=zeros(n,1);
    
   % [xis,Xip,Phip,Ppi,AICp,u] 
    bxis=zeros(n,1);
     bxip=zeros(n,1);
    bphip=zeros(n,1);
    bpi=zeros(n,1);
    bCp=zeros(n,1);
    bFp=zeros(n,1);
   
    for i=1:n
        Paras(ip)=ana(i);
        [xi0(i),xi1(i),xis(i),xip0(i),xip(i),phi0(i),phi1(i),phis(i),phip(i),Cs(i),Cp(i),pi(i),Fp(i)]=Solve_model(Paras);   
        [bxis(i),bxip(i),bphip(i),bpi(i),bCp(i),bFp(i)]=Solve_model_B(Paras);  
    end 
  %______________________________
  %______________________________
  %______________________________
 % [xi0,xi1,xis,xim,xip0,xip1,xip,phi0,phi1,phis,phip0,phip1,phip,Cs,Cp,pi]
 
  
 
 
  
  

          

    
     figure
    plot(pi0,xip,'--r',pi0,bxip,'-*b',pi0,xi1,':k',pi0,xi0,'-oc','linewidth',3);
    xlabel('The initial belief','Fontsize',16,'Fontname', 'Times');
    ylabel('Investment threshold','Fontsize',16,'Fontname', 'Times');
    hg = legend('PE without learning ','PE with learning','FB with high','FB with low',0); optex={'fontsize', 16, 'fontname', 'Times','Interpreter','tex'};  set(hg, optex{:});
    saveas(gcf,'2-2','epsc');
    saveas(gcf,'2-2','png'); 
    

    
    
        figure
    plot(pi0,phis,'-p',pi0,phip,'--r',pi0,bphip,'-*b',pi0,phi1,':k','linewidth',3);
    xlabel('The initial belief','Fontsize',16,'Fontname', 'Times');
    ylabel('Guarantee cost','Fontsize',16,'Fontname', 'Times');
    hg = legend('SE','PE without learning', 'PE with learning','FB with high',0); optex={'fontsize', 16, 'fontname', 'Times','Interpreter','tex'};  set(hg, optex{:});
    saveas(gcf,'3-2','epsc');
    saveas(gcf,'3-2','png'); 

    
    
     figure
    plot(pi0,Cs,'-p',pi0,Cp,'--r',pi0,bCp,'-*b','linewidth',3);
     axis([0 1 0 0.035]);
    xlabel('The initial belief','Fontsize',16,'Fontname', 'Times');
    ylabel('Cost of adverse selection','Fontsize',16,'Fontname', 'Times');
    hg = legend('SE','PE without learning','PE with learning',0); optex={'fontsize', 16, 'fontname', 'Times','Interpreter','tex'};  set(hg, optex{:});
    saveas(gcf,'4-1','epsc');
    saveas(gcf,'4-1','png');  

    
     figure
    plot(pi0,pi,'--r',pi0,bpi,'-*b','linewidth',3);
    xlabel('The initial belief','Fontsize',16,'Fontname', 'Times');
    ylabel('\pi(x_{ip})','Fontsize',16,'Fontname', 'Times');
    hg = legend('PE without learning','PE with learning',0); optex={'fontsize', 16, 'fontname', 'Times','Interpreter','tex'};  set(hg, optex{:});
    saveas(gcf,'3-1','epsc');
    saveas(gcf,'3-1','png');  
    

    
end